package com.rede.didiok.file.security.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.rede.didiok.common.config.feign.FeignConfiguration;

/**
 * @Author: Rede
 * @DateTime: 2023-08-14 19:11
 * @Description: 对didiok-user服务的远程调用feign类
 */
@FeignClient(name = "didiok-user", contextId = "didiok-user5", configuration = FeignConfiguration.class)
public interface UserFeignClient {

    /**
     * 根据用户名获取用户信息
     *
     * @param userName 用户名
     * @return
     */
    @RequestMapping(value = "/user/user/getByUserName", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8")
    String getByUserName(@RequestParam("userName") String userName);


}
